import { GET, POST, POST_JSON,FILE } from '@/utils/http.js'

// 供求列表
export const getSupplyInfoBySupply = (data) => {
    return POST_JSON('/shopSupplyDemand/findSupplyDemandList',data)
}
//供求详情
export const getSupplyInfoById = (data) => {
    return GET( `/shopSupplyDemand/findSupplyDemandDetail`,data)//?id=${id}
}
// 发布采购保存
export const saveSupplyDemand = (data) => {
    return POST_JSON('/shopSupplyDemand/saveDemand', data, true)
}
// 发布供应保存
export const getSaveDate = (data) => {
    return POST_JSON(`/shopSupplyDemand/saveSupplyDemandProduct`, data, true)
}
// 大洲国家列表
export const findCountryList = (data) => {
    return GET(`/common/intenetArea/findAllCountryList`,data)
}
// 筛选供求大洲国家列表
export const findCountryList1 = (data) => {
    return GET(`/supply/findAllCountryBySupplyData`,data)
}
// 查询省市区
export const getAreaByParentId = (data) => {
    return GET(`/common/area/getAreaAllData`,data)
}
// 拉黑
export const addBlackList = (data) => {
    return POST(`/shopUserBlack/addBlackList`,data)
}

//获取时间
export const getValueByTypeCode = (data) => {
    return GET(`/shopDict/getValueByTypeCode`,data)
}
//保存操作记录
export const saveGuideOperate = (data) => {
    return POST_JSON(`/dataGuideOperate/saveGuideOperate`,data)
}
// 发布供求上传
export const uploadImg = (data) => {
    return FILE(`/ajax/business/product/upload_product_image`,data)
}
// 发布供求置顶
export const updateSupplyDemandUpdateDate = (data) => {
    return POST_JSON(`/shopSupplyDemand/updateSupplyDemandUpdateDate`,data)
}
// 发布供求上下架
export const updateSupplyEnable = (data) => {
    return POST_JSON(`/shopSupplyDemand/updateSupplyEnable`,data)
}
// 发布供求编辑
export const updateSupplySkuProduct = (data) => {
    return POST_JSON(`/shopSupplyDemand/updateSupplySkuProduct`,data)
}

// 供求详情页 立即联系 发短信
export const getCaptcha = (data) => {
    return GET(`/shopSupplyDemand/getCaptcha`,data)
}